<template>
  <el-tag effect="light" :type="statusType(isFinish)">
    {{ statusName(isFinish) }}
  </el-tag>
</template>
<script>
export default {
  name: 'WfStatus',
  props: {
    isFinish: {
      type: Number,
      default: 0
    }
  },
  methods: {
    statusType(code) {
      var result
      switch (code) {
        case 0:
          result = 'default'
          break
        case 3:
          result = 'danger'
          break
        case 4:
          result = 'warning'
          break
        case 1:
          result = 'success'
          break
      }
      return result
    },
    statusName(code) {
      var result
      switch (code) {
        case 0:
          result = '正在运行'
          break
        case 3:
          result = '不同意'
          break
        case 4:
          result = '被驳回'
          break
        case 1:
          result = '审批通过'
          break
      }
      return result
    }
  }
}
</script>
